﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ass1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入第一个运算数：");
            string r1 = Console.ReadLine();
            double rr1 = double.Parse(r1);

            Console.WriteLine("请输入第二个运算数：");
            string r2 = Console.ReadLine();
            double rr2  = double.Parse(r2);

            Console.WriteLine("请输入运算符");
            string r3 = Console.ReadLine();

            if (r3 == "+")
            {   double result = rr1 + rr2;
                string output = result.ToString();
                Console.WriteLine("运算结果是：" + output);
                Console.ReadLine();
            }
            else if (r3 == "-")
            {
                double result = rr1 - rr2;
                string output = result.ToString();
                Console.WriteLine("运算结果是："+output);
                Console.ReadLine();
            }
            else if (r3 == "*")
            {
                double result = rr1 * rr2;
                string output = result.ToString();
                Console.WriteLine("运算结果是：" + output);
                Console.ReadLine();
            }
            else if (r3 == "/")
            {
                double result = rr1 / rr2;
                string output = result.ToString();
                Console.WriteLine("运算结果是：" + output);
                Console.ReadLine();
            }
            else
            {
                Console.WriteLine("出错了，再从“+”、“-”、“*”、“/”中选择一种运算吧！" );
                Console.ReadLine();
            }

        }
    }
}
